<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

    <li th:if="${#lists.isEmpty(dataMap['list'])}" id="no-data-li">
        <section class="no-data__wrap">
            <em>&nbsp;</em>
            <p>亲，暂无课程数据，小编正在整理中</p>
        </section>
    </li>
    <input type="hidden" id="totalPages" th:value="${dataMap['pages']}"/>
    <input type="hidden" id="currentPage" th:value="${dataMap['pageNum']}"/>
    <li th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="course : ${dataMap['list']}" class="item-content my-item-main mt5">
        <!-- 课程详情 -->
        <a href="javascript:void(0);" class="course-info" th:attrappend="data-id=${course['id']},data-type=${course['courseTypeKey']}">
            <div class="item-media">
                <section class="wm-item-picture__wrap pr">
                    <aside class="wm-picture-tag__wrap">
                        <span th:if="${course['courseTypeKey']}=='PACKAGE'" class="wm-picture-tag">套餐</span>
                        <span th:if="${course['courseTypeKey']}=='VIDEO'" class="wm-picture-tag">录播</span>
                        <span th:if="${course['courseTypeKey']}=='COLUMNS'" class="wm-picture-tag">专栏</span>
                        <span th:if="${course['courseTypeKey']}=='LIVE'" class="wm-picture-tag">直播</span>
                    </aside>
                    <img th:alt="${course['courseName']}" class="wm-img" th:attrappend="data-src=!${#maps.isEmpty(course['imageMap'])} and !${#maps.isEmpty(course['imageMap']['mobileUrlMap'])} and !${#strings.isEmpty(course['imageMap']['mobileUrlMap']['small'])}?${course['imageMap']['mobileUrlMap']['small']} :''" th:src="@{{path}/front/mobile/v3/img/default/default-pic.jpg(path=${staticPath})}"/>
                </section>
            </div>
            <div class="item-inner h-item-inner">
                <section class="item-title">
                    <span class="wm-cm-title course-id" th:text="${course['courseName']}"></span>
                    <section class="wm-attr-wrap row">
                        <!--<aside class="col-auto">
                            <span class="wm-txt-small" th:each="teacher,index : ${course['teacherList']}" th:if="${index['index']}==0" th:text="${teacher['teacherName']}"></span>
                        </aside>-->
                        <aside class="col-auto pl5">
                            <span class="wm-attr-ico"><em class="iconfont icon-home-1"></em></span>
                            <span class="wm-txt-small" th:text="${course['initBuyNum']} + ${course['courseProfile']['buyCount']}"></span>
                        </aside>
                    </section>
                    <section class="wm-attr-wrap row">
                        <aside class="col-50">
                            <span th:if="${course['memberPrice']} > 0 or ${course['realPrice']} > 0" class="wm-price">
                                <small>￥</small>
                                <samp th:text="${course['realPrice']}"></samp>
                            </span>
                            <span th:if="${course['realPrice']} <= 0 and ${course['memberCourse']} != 1" class="wm-price-free">
                                <small></small>免费
                            </span>
                            <span th:if="${course['memberCourse']} == 1" class="wm-price-free">
                                <small></small>会员课
                            </span>
                        </aside>
                        <aside th:if="${invite}" class="col-50 text-right extension" th:attr="data-id=${course['id']},data-name=${course['courseName']},data-img=${course['imageMap']['mobileUrlMap']['small']}">
                            <span class="button button-warning button-round">推广</span>
                        </aside>
                    </section>
                </section>
            </div>
        </a>
    </li>
    <script th:inline="javascript" type="text/javascript">
        var total = [[${dataMap['total']}]];
    </script>
</html>